查询 Batch Refund 对象

你可以使用 batch_refund_id 来查询对应的 batch refund 对象信息。

请求参数描述
BATCH_REFUND_ID required string批量退款对象 id,由 Ping++ 生成,该参数仅需要填写在请求地址内。

返回

返回一个 batch refund 对象或者一个错误,详见 错误

定义

GET https://api.pingxx.com/v1/batch_refunds/{BATCH_REFUND_ID}
$batch_re = \Pingpp\BatchRefund::retrieve($id);
待补充。
待补充。
待补充。
待补充。
refunds, err := batchRefund.Get("151611141520583238");
待补充。

请求示例

curl https://api.pingxx.com/v1/batch_refunds/151608161453545122 \
-u sk_test_ibbTe5jLGCi5rzfH4OqPW9KC:
try {
    $batch_re = \Pingpp\BatchRefund::retrieve('151611141520583238');        //批量退款对象id,由 Ping++ 生成
    echo $batch_re;                                                         // 输出 Ping++ 返回的 batch refund 对象列表
} catch (\Pingpp\Error\Base $e) {
    if ($e->getHttpStatus() != null) {
        header('Status: ' . $e->getHttpStatus());
        echo $e->getHttpBody();
    } else {
        echo $e->getMessage();
    }
}
待补充。
待补充。
待补充。
待补充。
func Example_get() {
  refunds, err := batchRefund.Get("151611141520583238")
  if err != nil {
    log.Fatal(err)
    return
  }
  fmt.Printf("%#v", refunds)
}
待补充。

返回示例

{
    "id": "151608161453545102",
    "app": "app_abcdefghweqzadfs",
    "object": "batch_refund",
    "batch_no": "batchrefund20160801001",
    "created": 1409634192,
    "description": "Batch refund description.",
    "charges": [
        {
            "charge": "ch_L8qn10mLmr1GS8e5OODmHaL4",
            "refund": null,
            "status": "created",
            "failure_msg": null,
            "amount": 10,
            "description": "Batch refund description."
        },
        {
            "charge": "ch_fdOmHaLmLmr1GOD4qn1dS8e5",
            "refund": null,
            "status": "created",
            "failure_msg": null,
            "amount": 10,
            "description": "Batch refund description."
        }
    ],
    "refunds": {
        "object": "list",
        "url": null,
        "has_more": false,
        "data": [
            {
                "id": "re_y1u944PmfnrTHyvnL0nD0iD1",
                "object": "refund",
                "order_no": "y1u944PmfnrTHyvnL0nD0iD1",
                "amount": 10,
                "created": 1409634160,
                "succeed": true,
                "status": "succeeded",
                "time_succeed": 1409634192,
                "description": "Batch refund description.",
                "failure_code": null,
                "failure_msg": null,
                "metadata": {},
                "charge": "ch_L8qn10mLmr1GS8e5OODmHaL4",
                "charge_order_no": "123456789",
                "transaction_no": "2004450349201512090096425280",
				  "funding_source": null,
				  "extra": {}
            },
            {
                "id": "re_nL0nD0iDPmfy1u944HyvnrT1",
                "object": "refund",
                "order_no": "nL0nD0iDPmfy1u944HyvnrT1",
                "amount": 10,
                "created": 1409634160,
                "succeed": true,
                "status": "succeeded",
                "time_succeed": 1409634192,
                "description": "Batch refund description.",
                "failure_code": null,
                "failure_msg": null,
                "metadata": {},
                "charge": "ch_fdOmHaLmLmr1GOD4qn1dS8e5",
                "charge_order_no": "123456789",
                "transaction_no": "2004450349201512090096425281",
				  "funding_source": null,
				  "extra": {}
            }
        ]
    },
    "refund_url": null
}